﻿<Window x:Class="Pap.FrontEnd.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Revista Programar - Kinect Hack" 
		Height="550" Width="900" 
		Background="WhiteSmoke"
		WindowStartupLocation="CenterScreen" 
        Icon="/Pap.FrontEnd;component/Images/pap_ico.png" ResizeMode="NoResize" Margin="5">

    
    <Window.Resources>
        <DataTemplate x:Key="DataTemplateRecorder" >
            <Grid HorizontalAlignment="Left" Width="200" Margin="5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="50"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Source="Images/display_recorder.png" Grid.Column="0" Width="32"/>
                <TextBlock Text="Record Data" ToolTip="Click to Record and then click again to stop recording." Grid.Column="1" FontSize="17" FontFamily="Segoe WP Semibold" VerticalAlignment="Center"/>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="DataTemplatePlayer">
            <Grid HorizontalAlignment="Left" Width="200" Margin="5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="50"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Source="Images/display_player.png" Grid.Column="0" Width="32"/>
                <TextBlock Text="Play Recording" Grid.Column="1" FontSize="17" FontFamily="Segoe WP Semibold" VerticalAlignment="Center"/>
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="DataTemplateVGA">
			<Grid HorizontalAlignment="Left" Width="200" Margin="5">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="50"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<Image Source="Images/display_VGA.png" Grid.Column="0" Width="32"/>	
				<TextBlock Text="VGA Camera" Grid.Column="1" FontSize="17" FontFamily="Segoe WP Semibold" VerticalAlignment="Center"/>
			</Grid>
		</DataTemplate>
		<DataTemplate x:Key="DataTemplateIR">
			<Grid HorizontalAlignment="Left" Width="200" Margin="5">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="50"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<Image Source="Images/display_IR.png" Grid.Column="0" Width="32"/>	
				<TextBlock Text="IR Camera" Grid.Column="1" FontSize="17" FontFamily="Segoe WP Semibold" VerticalAlignment="Center"/>
			</Grid>
		</DataTemplate>
		<DataTemplate x:Key="DataTemplateDepth">
			<Grid HorizontalAlignment="Left" Width="200" Margin="5">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="50"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<Image Source="Images/display_Depth.png" Grid.Column="0" Width="32"/>	
				<TextBlock Text="Depth Camera" Grid.Column="1" FontSize="17" FontFamily="Segoe WP Semibold" VerticalAlignment="Center"/>
			</Grid>
		</DataTemplate>
		<DataTemplate x:Key="DataTemplateSkeleton">
			<Grid HorizontalAlignment="Left" Width="200" Margin="5">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="50"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<Image Source="Images/display_Skeleton.png" Grid.Column="0" Width="32"/>	
				<TextBlock Text="Tracking" Grid.Column="1" FontSize="17" FontFamily="Segoe WP Semibold" VerticalAlignment="Center"/>
			</Grid>
		</DataTemplate>
	</Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
        	<ColumnDefinition Width="660"/>
			<ColumnDefinition Width="*"/>
		</Grid.ColumnDefinitions>
		<GroupBox Grid.Column="0" Header="Kinect Output" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5" MinWidth="640" MinHeight="480">
			<Image Source="Images/kinect_img.png" Width="640" Height="480" x:Name="kinectData"/>
		</GroupBox>	
		<GroupBox Grid.Column="1" Header="Kinect Control" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,5,5,5">
			<Grid Margin="5">
				<Grid.RowDefinitions>
					<RowDefinition Height="50"/>
					<RowDefinition Height="50"/>
					<RowDefinition Height="50"/>
					<RowDefinition Height="50"/>
					<RowDefinition Height="50"/>
					<RowDefinition Height="50"/>
                    <RowDefinition Height="150"/>
				</Grid.RowDefinitions>
				<Button x:Name="btnVga" Content="Button" Grid.Row="0" ContentTemplate="{DynamicResource DataTemplateVGA}" Click="btnVga_Click"/>
				<Button x:Name="btnIR" Content="Button" Grid.Row="1" ContentTemplate="{DynamicResource DataTemplateIR}" Click="btnIR_Click"/>
				<Button x:Name="btnDepth" Content="Button" Grid.Row="2" ContentTemplate="{DynamicResource DataTemplateDepth}" Click="btnDepth_Click"/>
				<Button x:Name="btnSkeleton" Content="Button" Grid.Row="3" ContentTemplate="{DynamicResource DataTemplateSkeleton}" Click="btnSkeleton_Click"/>
                <Button x:Name="btnPlayer" Content="Button" Grid.Row="4" ContentTemplate="{DynamicResource DataTemplatePlayer}" Click="btnPlayer_Click"/>
                <Button x:Name="btnRecorder" Content="Button" Grid.Row="5" ContentTemplate="{DynamicResource DataTemplateRecorder}"  Click="btnRecorder_Click"/>
                <StackPanel x:Name="info" Orientation="Vertical" Grid.Row="6" Margin="0,35,0,0">
                    <TextBlock Text="Bruno Pires" FontFamily="Segoe WP Semibold"/>
					<TextBlock Text="Twitter: @brunoacpires" FontFamily="Segoe WP Semibold"/>
					<TextBlock Text="Email: bruno@blastersystems.com" FontFamily="Segoe WP Semibold"/>
					<TextBlock Text="Blog: http://blog.blastersystems.com" FontFamily="Segoe WP Semibold"/>
                </StackPanel>
			</Grid>
		</GroupBox>
    </Grid>
</Window>
